package live

import (
	"github.com/gin-gonic/gin"
	"vrcm/src/vrcm/app/admin/apis/live"
	"vrcm/src/vrcm/app/admin/router"
)

func init() {
	router.NoCheckRole = append(router.NoCheckRole, registerLiveBasicRouter)
}

// registerLiveBasicRouter
func registerLiveBasicRouter(v1 *gin.RouterGroup) {
	api := apis.LiveBasic{}
	r := v1.Group("/live-basic")
	{
		r.POST("/get-list", api.GetPage)
		r.POST("/get-list-for-enterprise", api.GetPageForEnterprise)
		r.GET("/:id", api.Get)
		r.POST("/insert", api.Insert)
		r.POST("/update", api.Update)
		r.POST("/delete", api.Delete)
		r.POST("/update-live-stream", api.UpdateLiveStream)
		r.POST("/dress-live", api.DressLive)
		r.POST("/start-live", api.StartLive)
		r.POST("/stop-live", api.EndLive)
		r.POST("/stop-live-task", api.StopLiveTask)
		r.POST("/update-basic-info", api.UpdateBasicInfo)
		r.POST("/save-corp-id", api.SaveCorpId)
		r.POST("/save-guide-page", api.SaveGuidePage)
		r.POST("/save-virtual-num", api.SaveVirtualNum)
		r.POST("/enable-or-stop-im", api.EnableOrStopIM)
		r.POST("/enable-or-stop-likes", api.EnableOrStopLikes)
		r.POST("/enable-or-stop-comment", api.EnableOrStopComment)
		r.POST("/enable-or-stop-count-down", api.EnableOrStopCountDown)
		r.POST("/enable-or-reservation", api.EnableOrStopReservation)
		r.POST("/save-pull-address", api.SavePullStreamAddress)
		r.POST("/start-pull-live", api.StartPullStreamLive)
		r.POST("/stop-pull-live", api.StopPullStreamLive)
		r.GET("/get-for-live/:id", api.GetForLive)
		r.POST("/get-personalization", api.GetPersonalization)
		r.POST("/get-live-state", api.GetLiveState)
		r.POST("/get-wechat-access-token", api.GetWechatAccessToken)
		r.POST("/get-wechat-callback", api.WechatCallBack)
		r.GET("/get-wechat-callback", api.WechatCallBack)
		r.POST("/get-wechat-callback1", api.WechatCallBackForScan)
		r.GET("/get-wechat-callback1", api.WechatCallBackForScan)
		r.GET("/get-wechat-access-suite-token", api.GetWechatAccessSuiteToken)
		r.GET("/get-wechat-access-suite-token-for-scan", api.GetSuiteAccessTokenForScan)
		r.GET("/get-provider-token", api.GetProviderToken)
		r.POST("/get-pre-code", api.GetPreCode)
		r.POST("/get-permanen-code", api.GetPermanenCode)
		r.POST("/get-corp-token", api.GetCorpToken)
		r.POST("/get-corp-token-cache", api.GetCorpTokenCache)
		r.POST("/get-api-ticket", api.GetApiTicket)
		r.POST("/get-api-ticket-without-type", api.GetApiTicketWithoutType)
		r.POST("/get-signature", api.GetSignature)
		r.POST("/get-login-info", api.GetLoginInfo)
		r.GET("/get-wechat-info", api.GetWeChatInfo)
		r.POST("/set-auth-code", api.SetAuthCode)
		r.POST("/get-user-info", api.GetUserInfo)
		r.POST("/get-special-user-info", api.GetSpecialUserInfo)
		//r.POST("/get-wechat-callback1", api.WechatCallBack)
		//r.GET("/get-wechat-callback1", api.WechatCallBack)
		r.POST("/save-portal", api.SavePortal)
		r.POST("/get-portal", api.GetPortal)
		r.POST("/get-portal-info", api.GetPortalInfo)
		r.POST("/confirm-record", api.ConfirmRecord)
		r.POST("/save-publish", api.SavePublishSetting)
		r.POST("/get-publish", api.GetPublishSetting)
		r.POST("/move-view", api.MoveView)
		r.POST("/create-platform", api.CreatePlatform)
		r.POST("/update-platform", api.UpdatePlatform)
		r.POST("/delete-platform", api.DeletePlatform)
		r.POST("/start-platform", api.StartPlatform)
		r.POST("/stop-platform", api.StopPlatform)
		r.GET("/get-platform/:id", api.GetPlatform)
		r.POST("/get-platform-list", api.GetPlatformList)
		r.POST("/insert-vod-live", api.InsertVodLive)
		r.POST("/publish-vod-live", api.PublishVod)
		r.POST("/set-black-user", api.SetBlackUser)
		r.POST("/delete-black-user", api.DeleteBlackUser)
		r.POST("/get-black-user", api.GetBlackUser)
		r.POST("/start-pc-live", api.StartPCLive)
		r.POST("/stop-pc-live", api.StopPCLive)
		r.POST("/get-ws-list", api.GetWsList)
		r.POST("/get-need-ws-list", api.GetNeedWsList)
		r.POST("/get-live-duration", api.GetLiveDuration)
		r.POST("/get-con", api.GetCon)
	}
}
